<?php

use common\helpers\Url;
use yii\widgets\LinkPager;
use common\enums\PayTypeEnum;
use common\helpers\Html;
use addons\TinyShop\common\helpers\OrderHelper;
use addons\TinyShop\common\enums\RefundStatusEnum;
use addons\TinyShop\common\enums\AccessTokenGroupEnum;

$this->title = '奖金汇总';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title"><?= $this->title; ?></h3>
                <div class="box-tools">

                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive">
                <table class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>奖项名</th>
                        <th>累计业绩</th>
                        <th>奖金</th>
                        <th>扣税</th>
                        <th>管理费</th>
                        <th>实发</th>
                        <th>拨出比例</th>
                        <th>详情</th>
                    </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($models as $key => $model){ ?>
                                <tr data-key= "<?= $key ?>">
                                    <td>
                                        <?=$model['name']?>
                                    </td>
                                    <td>
                                        <?=$model['jiesuan']?>
                                    </td>
                                    <td>
                                        <?=$model['jianjin']?>
                                    </td>
                                    <td>
                                        <?=$model['koushui']?>
                                    </td>
                                    <td>
                                        <?=$model['guanli']?>
                                    </td>
                                    <td>
                                        <?=$model['shifa']?>
                                    </td>
                                    <td>
                                        <?=$model['bochu']?>
                                    </td>
                                    <td>
                                        <?php if(isset($model['xiangqing'])):?>
                                            <?= Html::linkButton([$model['xiangqing']], '查看');?>
                                        <?php endif;?>
                                    </td>
                                </tr>
                        <?php } ?>
                    </tbody>
                </table>
                
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
    </div>
</div>

<script>
    var orderProductAgreeUrl = "<?= Url::to(['refund-pass']); ?>";
    var orderProductRefuseUrl = "<?= Url::to(['refund-no-pass']); ?>";
    var orderProductDeliveryUrl = "<?= Url::to(['refund-delivery']); ?>";
</script>